Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect cyclic subtype goals in new solver #110202

Closed

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Apr 11, 2023

Bubble up subtyping relations that become stalled so that the generalizer can eagerly detect cyclic responses to goals such as ?0 <: Box<?1> when ?0 <: ?1 is already a registered subtype obligation. Otherwise, processing these two in tandem will cause us to repeatedly substitute and get a runaway type.

Fixes compiler-errors/next-solver-hir-issues#18

Opening for discussion mostly.

@rustbot
Copy link
Collaborator

rustbot commented Apr 11, 2023

r? @cjgillot

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative labels Apr 11, 2023
@rustbot
Copy link
Collaborator

rustbot commented Apr 11, 2023

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@compiler-errors
Copy link
Member Author

whoops

r? @lcnr

@lcnr
Copy link
Contributor

lcnr commented Apr 12, 2023

is this only to not get fulfillment overflow? because i personally would like to avoid this and just accept that fulfillment overflows for these 🤔

@compiler-errors
Copy link
Member Author

Decided against this I think

@compiler-errors compiler-errors deleted the cyclic-subtype-goals branch August 11, 2023 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infinite loop in fulfillment ICE
4 participants